# $Id: PKGBUILD 82517 2013-01-20 01:26:52Z heftig $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Nicky726 (Nicky726 <at> gmail <dot> com)
# Contributor: Allan McRae (allan <at> archlinux <dot> org)
# Contributor: Alexander 'bas' Brovikov (bas <at> it-core <dot> org)

pkgname=wine_gecko
pkgver=1.9
pkgrel=1
pkgdesc="Wine's built-in replacement for Microsoft's Internet Explorer"
arch=(i686 x86_64)
url="http://wiki.winehq.org/Gecko"
license=(MPL)
depends=('wine>=1.5.22')
source=(http://downloads.sourceforge.net/project/wine/Wine%20Gecko/$pkgver/$pkgname-$pkgver-x86{,_64}.msi)
md5sums=('54a6418e2469fad5c4374a35ea54cf1a'
         '9f870bef3aa17b3de06c8d36be5508f2')

if [[ $CARCH == i686 ]]; then
  # Strip x86_64 msi
  source=(${source[0]})
  md5sums=(${md5sums[0]})
fi

package() {
  cd "$srcdir"
  _geckodir="$pkgdir/usr/share/wine/gecko"
  install -Dm644 $pkgname-$pkgver-x86.msi "$_geckodir/$pkgname-$pkgver-x86.msi"
  if [[ $CARCH == x86_64 ]]; then
    install -m644 $pkgname-$pkgver-x86_64.msi "$_geckodir/"
  fi
}
